import React, { PureComponent } from 'react'
import { Text, View ,TouchableOpacity,Image,StyleSheet} from 'react-native'
import {Heading3} from '../../widget/Text.js'
import screen from '../../common/screen'
export default class OrderMenuItem extends PureComponent {
  render() {
      let { onPress,icon,title}  = this.props;
    return (
      <TouchableOpacity style={styles.container} onPress={onPress}>
        <Image  source={icon} resizeMode='contain' style={styles.icon}/>
        <Heading3>{title}</Heading3>
      </TouchableOpacity>
    )
  }
}

const styles  = StyleSheet.create({
    container:{
        justifyContent: 'center',
        alignItems: 'center',
        width:screen/4,
        height:screen/5,
    },
    icon:{
        width:30,
        width:30,
        margin:5
    }
})